<!DOCTYPE html>
<html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-0 vector-toc-not-available vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-0 vector-feature-night-mode-enabled skin-theme-clientpref-os vector-sticky-header-enabled" lang="fr" dir="ltr"><head>
<meta charset="UTF-8">
<title>LuaTeX</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="./_res_/favicon.png">
<link rel="canonical" href="https://fr.wikipedia.org/wiki/LuaTeX"> <link href="./_mw_/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.wikimediamessages.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./_mw_/site.styles.css">
<link rel="stylesheet" type="text/css" href="./_mw_/noscript.css">
<link rel="stylesheet" type="text/css" href="./_res_/footer.css">
<link rel="stylesheet" type="text/css" href="./_res_/vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-LuaTeX rootpage-LuaTeX skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">LuaTeX</span></h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="contentSub">
<div id="mw-content-subtitle"></div>
</div>
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="fr" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="fr" dir="ltr">
<div class="infobox_v3 infobox infobox--frwiki noarchive" style="width:260px">
<div class="entete icon informatique" style="color: #000000;"><style data-mw-deduplicate="TemplateStyles:r228712691">
/* start https://fr.wikipedia.org/ */
.mw-parser-output .entete.informatique{background-image:url("./_mw_/Picto.nfo.png")}
/* end https://fr.wikipedia.org/ */
</style>
<div>LuaTeX</div>
</div>
<div class="images">
</div>
<div class="hr" style="height:2px;"></div>
<div class="images">
</div>
<table><caption style="color:#000000;">Informations</caption>
<tbody><tr>
<th scope="row"><a href="D%C3%A9veloppeur" title="Développeur">Développé par</a></th>
<td>
Taco Hoekwater<br>Hartmut Henkel<br>Hans Hagen</td>
</tr>
<tr>
<th scope="row"> <a href="Version_d'un_logiciel" title="Version d'un logiciel">Première version</a>
</th>
<td>
<span class="wd_p571"><time>2007</time></span></td>
</tr>
<tr>
<th scope="row"> <a href="Version_d'un_logiciel" title="Version d'un logiciel">Dernière version</a>
</th>
<td>
<span class="wd_p348">1.21.0 (<time class="nowrap" datetime="2025-02-13" data-sort-value="2025-02-13">13 février 2025</time>)<sup id="cite_ref-wikidata-ce8dc7d38816fa84e1ae07f0debd35e16018aac7_1-0" class="reference"><a href="#cite_note-wikidata-ce8dc7d38816fa84e1ae07f0debd35e16018aac7-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup></span></td>
</tr>
<tr>
<th scope="row"><a href="D%C3%A9p%C3%B4t_(informatique)" title="Dépôt (informatique)">Dépôt</a></th>
<td>
<span class="wd_p1324"><a rel="nofollow" class="external text" href="https://gitlab.lisn.upsaclay.fr/texlive/luatex">gitlab.lisn.upsaclay.fr/texlive/luatex</a></span></td>
</tr>
<tr>
<th scope="row"> <a href="Langage_de_programmation" title="Langage de programmation">Écrit en</a>
</th>
<td>
<span class="wd_p277"><a href="C_(langage)" title="C (langage)">C</a></span></td>
</tr>
<tr>
<th scope="row"><a href="Syst%C3%A8me_d'exploitation" title="Système d'exploitation">Système d'exploitation</a></th>
<td>
<span class="wd_p306"><a href="Type_Unix" title="Type Unix">Type Unix</a> et <a href="Microsoft_Windows" title="Microsoft Windows">Microsoft Windows</a></span></td>
</tr>
<tr>
<th scope="row"><a href="Plateforme_informatique" title="Plateforme informatique">Environnement</a></th>
<td>
<a href="Multiplate-forme" class="mw-redirect" title="Multiplate-forme">Multiplate-forme</a></td>
</tr>
<tr>
<th scope="row"> Type
</th>
<td>
<span class="wd_p31">Paquet de macro TeX <small>(<a href="https://www.wikidata.org/wiki/Q19595415" class="extiw external" title="d:Q19595415"><span class="indicateur-langue" title="Voir l'élément Wikidata correspondant">d</span></a>)</small></span></td>
</tr>
<tr>
<th scope="row"><a href="Licence_de_logiciel" title="Licence de logiciel">Licences</a></th>
<td>
<a href="Licence_publique_g%C3%A9n%C3%A9rale_GNU" title="Licence publique générale GNU">GNU GPL</a></td>
</tr>
<tr>
<th scope="row"><a href="Site_web" title="Site web">Site web</a></th>
<td>
<span class="wd_p856"><a rel="nofollow" class="external text" href="https://www.luatex.org">www.luatex.org</a></span></td>
</tr>
</tbody></table>
<p class="mw-empty-elt">
</p>
</div>
<p><b>LuaTeX</b> est un système de <a href="Composition_(imprimerie)" title="Composition (imprimerie)">composition</a> <a href="Informatique" title="Informatique">informatique</a> dérivé de <a href="TeX" title="TeX">Tex</a> utilisant le langage de script <a href="Lua" title="Lua">Lua</a>. Il a été choisi pour remplacer <a href="PdfTeX" title="PdfTeX">pdfTeX</a><sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> ; qui n'est plus développé pour cette raison. La version 2.9 de <a href="MiKTeX" title="MiKTeX">MiKTeX</a> inclut LuaTeX pour la première fois (version 0.60.2<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>).
</p>
<div class="mw-heading mw-heading2"><h2 id="Description">Description</h2></div>
<p>LuaTeX présente une approche différente des autres moteurs. Grâce à l’inclusion du langage de script Lua, il se passe de bibliothèque externe, ce qui assure son indépendance et permet une grande flexibilité. L'utilisation de Lua offre un confort de développement impressionnant et permet d'ouvrir le champ des possibles. Grâce à Lua, le moteur de composition est « ouvert », et il existe des <i><a href="Fonction_de_rappel" title="Fonction de rappel">callbacks</a></i> qui permettent d'obtenir des résultats divers.
</p><p>Cependant, cela a un prix. Premièrement, LuaTeX n'est pas aussi rapide que ses cousins. Ensuite, pour en tirer tout le potentiel, il faut utiliser des aspects bas niveau de programmation. L'addition de scripts Lua est très intéressante, mais la puissance de LuaTeX ne se révèle vraiment que lorsque ceux-ci sont pleinement intégrés.
</p>
<div class="mw-heading mw-heading3"><h3 id="Le_paysage">Le paysage</h3></div>
<p>Il existe actuellement deux autres <a href="Moteur_de_composition" title="Moteur de composition">moteurs de composition</a> dans le monde de <a href="TeX" title="TeX">TeX</a> :
</p><p>Le moteur <a href="PdfTeX" title="PdfTeX">pdfTeX</a>, une extension stable de TeX, permet de générer directement un fichier PDF, avec les fonctionnalités avancées du format PDF. Il est rapide et robuste. Cependant, sa gestion des <a href="Fonte_de_caract%C3%A8res" title="Fonte de caractères">fontes</a> <a href="OpenType" title="OpenType">OpenType</a> demeure très limitée.
</p><p>Et <a href="XeTeX" title="XeTeX">XeTeX</a> qui, lui, supporte l'encodage <a href="Unicode" title="Unicode">Unicode</a>, de même que les fontes OpenType (à l’aide de bibliothèques externes). Ce moteur s'intègre très bien dans l'infrastructure des distributions TeX et supporte les extensions (<i>packages</i>) de macros facilement, puisqu'il n'y pas de changements fondamentaux concernant l'interface et les fonctionnalités.
</p>
<div class="mw-heading mw-heading3"><h3 id="Exemple_de_document">Exemple de document</h3></div>
<p>Voici un exemple en LuaLaTeX : à gauche le code source, qui peut être produit avec n’importe quel <a href="%C3%89diteur_de_texte" title="Éditeur de texte">éditeur de texte</a> ; à droite la sortie correspondante, indépendante du type d’écran ou d’imprimante sur lequel elle est générée.
</p>
<table class="wikitable">
<tbody><tr>
<th>Code source d’un document en LuaLaTeX
</th>
<th>Document compilé
</th></tr>
<tr>
<td style="background-color: #fff;">
<div class="mw-highlight mw-highlight-lang-latex mw-content-ltr" dir="ltr"><pre><span></span><span class="c">%% Ce code source doit être enregistré en UTF-8 et</span>
<span class="c">%% compilé avec lualatex.</span>
<span class="k">\documentclass</span><span class="na">[a4paper]</span><span class="nb">{</span>scrartcl<span class="nb">}</span>
<span class="k">\usepackage</span><span class="na">[french]</span><span class="nb">{</span>babel<span class="nb">}</span>
<span class="c">% Ou:</span>
<span class="c">% \usepackage{polyglossia}</span>
<span class="c">% \setdefaultlanguage{french}</span>
<span class="k">\usepackage</span><span class="nb">{</span>fontspec<span class="nb">}</span>
<span class="k">\usepackage</span><span class="nb">{</span>unicode-math<span class="nb">}</span>
<span class="k">\usepackage</span><span class="nb">{</span>luacode<span class="nb">}</span>
<span class="k">\setromanfont</span><span class="nb">{</span>Linux Libertine O<span class="nb">}</span>
<span class="k">\setsansfont</span><span class="nb">{</span>Linux Biolinum O<span class="nb">}</span>
<span class="k">\setmonofont</span><span class="nb">{</span>Inconsolata<span class="nb">}</span>[Scale=0.9]
<span class="k">\setmathfont</span><span class="nb">{</span>Latin Modern Roman<span class="nb">}</span>
<span class="k">\title</span><span class="nb">{</span>Document test<span class="nb">}</span>
<span class="k">\author</span><span class="nb">{</span>Boris Godounov<span class="nb">}</span>
<span class="k">\date</span><span class="nb">{</span>29 février 2020<span class="nb">}</span>
<span class="k">\begin</span><span class="nb">{</span>document<span class="nb">}</span>
<span class="k">\maketitle</span>
<span class="k">\tableofcontents</span>
<span class="k">\section</span><span class="nb">{</span>Polices de caractères<span class="nb">}</span>
À la différence de <span class="k">\TeX</span><span class="nb">{}</span> ou de pdf<span class="k">\TeX</span><span class="nb">{}</span>, Lua<span class="k">\TeX</span><span class="nb">{}</span> permet d’utiliser
les polices installées sur le système d’exploitation comme ici
Linux Libertine (police de labeur), Linux Biolinum (titres),
Inconsolata (police à chasse fixe) et Latin Modern (pour
les mathématiques).
<span class="k">\section</span><span class="nb">{</span>Formules<span class="nb">}</span>
Même si l’on n’a pas besoin d’écrire de formules, Lua<span class="k">\TeX</span><span class="nb">{}</span> se révèle très
utile et simple d’utilisation : graphiques, tableaux, références croisées
de toutes sortes, bibliographie ou index ne posent aucun problème.
L’écriture de formules requiert un peu plus de travail, mais voici un exemple
simple :
<span class="k">\begin</span><span class="nb">{</span>displaymath<span class="nb">}</span>
E = <span class="k">\frac</span><span class="nb">{</span>m<span class="nb">_{</span>0<span class="nb">}</span> c<span class="nb">^{</span>2<span class="nb">}}{</span><span class="k">\sqrt</span><span class="nb">{</span>1-v<span class="nb">^{</span>2<span class="nb">}</span>/c<span class="nb">^{</span>2<span class="nb">}}}</span>
<span class="k">\end</span><span class="nb">{</span>displaymath<span class="nb">}</span>
<span class="k">\section</span><span class="nb">{</span>Programmation en Lua<span class="nb">}</span>
Lua<span class="k">\TeX</span><span class="nb">{}</span> est en outre capable d’exécuter du code Lua depuis le fichier
source en Lua<span class="k">\LaTeX</span><span class="nb">{}</span> ou Con<span class="k">\TeX</span><span class="nb">{}</span>t. Par exemple, <span class="k">\texttt</span><span class="nb">{</span>directlua<span class="nb">}</span>
permet de générer le nombre aléatoire <span class="k">\directlua</span><span class="nb">{</span>tex.print(math.random())<span class="nb">}</span>.
Il~n’est pas non plus nécessaire de se rappeler la valeur du nombre <span class="s">$</span><span class="nb">π</span><span class="s">$</span> :
<span class="k">\directlua</span><span class="nb">{</span>tex.print(math.pi)<span class="nb">}</span>.
En recourant à l’environnement <span class="k">\texttt</span><span class="nb">{</span>luacode<span class="nb">}</span>, vous pouvez même compter,
comme ici jusqu’à soixante :
<span class="k">\begin</span><span class="nb">{</span>luacode<span class="nb">}</span>
for x=1,60 do
tex.print(x)
end
<span class="k">\end</span><span class="nb">{</span>luacode<span class="nb">}</span>
.
Ici se termine le document de test.
<span class="k">\end</span><span class="nb">{</span>document<span class="nb">}</span>
</pre></div>
</td>
<td style="background-color: #fff;" valign="top">
</td></tr></tbody></table>
<div class="mw-heading mw-heading2"><h2 id="Versions">Versions</h2></div>
<p>La distribution <a href="TeX_Live" title="TeX Live">TeX Live</a> 2019 contient la version 1.10 de LuaTeX.
</p><p>La version 0.0 a été présentée lors de la conférence du TeX User Group (TUG) en 2005 à Wuhan en Chine.
</p>
<div class="mw-heading mw-heading2"><h2 id="Notes_et_références"><span id="Notes_et_r.C3.A9f.C3.A9rences"></span>Notes et références</h2></div>
<div class="references-small decimal" style=""><div class="mw-references-wrap"><ol class="references">
<li id="cite_note-wikidata-ce8dc7d38816fa84e1ae07f0debd35e16018aac7-1"><span class="mw-cite-backlink"><a href="#cite_ref-wikidata-ce8dc7d38816fa84e1ae07f0debd35e16018aac7_1-0">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://svn.tug.org:8369/texlive/trunk/Build/source/texk/web2c/luatexdir/NEWS?revision=73865&view=co"><cite style="font-style:normal;">https://svn.tug.org:8369/texlive/trunk/Build/source/texk/web2c/luatexdir/NEWS?revision=73865&view=co</cite></a> »</span></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><a href="#cite_ref-2">↑</a> </span><span class="reference-text"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> <a rel="nofollow" class="external text" href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=luatex">pdfTeX et LuaTeX</a>.</span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><a href="#cite_ref-3">↑</a> </span><span class="reference-text"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> <a rel="nofollow" class="external text" href="http://miktex.org/">Page d'accueil du projet MiKTeX</a>.</span>
</li>
</ol></div>
</div>
<div class="mw-heading mw-heading2"><h2 id="Annexes">Annexes</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Articles_connexes">Articles connexes</h3></div>
<ul><li><a href="Lua" title="Lua">Lua</a></li>
<li><a href="LaTeX" title="LaTeX">LaTeX</a></li></ul>
<div class="mw-heading mw-heading3"><h3 id="Bibliographie">Bibliographie</h3></div>
<ul><li><abbr class="abbr indicateur-langue" title="Langue : français">(fr)</abbr> Paul Isambert : <a rel="nofollow" class="external text" href="http://cahiers.gutenberg.eu.org/cg-bin/article/CG_2010___54-55_3_0.pdf"><i>LuaTeX, vue d'ensemble</i></a> <abbr class="abbr indicateur-format format-pdf" title="Document au format Portable Document Format (PDF)">[PDF]</abbr>, 2010</li>
<li><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Manuel Pégourié-Gonnard : <a rel="nofollow" class="external text" href="http://dante.ctan.org/tex-archive/info/luatex/lualatex-doc/lualatex-doc.pdf"><i><span class="lang-en" lang="en">A guide to LuaLaTeX</span></i></a> <abbr class="abbr indicateur-format format-pdf" title="Document au format Portable Document Format (PDF)">[PDF]</abbr>, <time class="nowrap" datetime="2010-11-11" data-sort-value="2010-11-11">11 novembre 2010</time></li>
<li><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> <i><span class="lang-en" lang="en">LuaTeX development team</span></i> : <span class="ouvrage"><span class="noarchive">« <a rel="nofollow" class="external text" href="http://dante.ctan.org/tex-archive/systems/luatex/base/manual/luatexref-t.pdf"><cite style="font-style:normal; color:var(--color-link-red, #d73333);"><i><span class="lang-en" lang="en">LuaTeX Reference Manual</span></i></cite></a> »<sup class="">(<a rel="nofollow" class="external text" href="https://web.archive.org/web/*/http://dante.ctan.org/tex-archive/systems/luatex/base/manual/luatexref-t.pdf">Archive.org</a> • <a rel="nofollow" class="external text" href="https://archive.wikiwix.com/cache/?url=http://dante.ctan.org/tex-archive/systems/luatex/base/manual/luatexref-t.pdf">Wikiwix</a> • <a rel="nofollow" class="external text" href="https://archive.is/http://dante.ctan.org/tex-archive/systems/luatex/base/manual/luatexref-t.pdf">Archive.is</a> • <a rel="nofollow" class="external text" href="https://webcache.googleusercontent.com/search?hl=fr&q=cache:http://dante.ctan.org/tex-archive/systems/luatex/base/manual/luatexref-t.pdf">Google</a> • Que faire ?)</sup></span></span> <abbr class="abbr indicateur-format format-pdf" title="Document au format Portable Document Format (PDF)">[PDF]</abbr>, <time class="nowrap" datetime="2011-05-20" data-sort-value="2011-05-20">20 mai 2011</time></li></ul>
<div class="mw-heading mw-heading3"><h3 id="Liens_externes">Liens externes</h3></div>
<ul><li><cite class="ouvrage" id="site_officiel" style="font-style: normal;"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> <a rel="nofollow" class="external text" href="http://www.luatex.org/">Site officiel</a></cite></li></ul>
<div class="navbox-container" style="clear:both;">
</div>
<ul id="bandeau-portail" class="bandeau-portail"><li><span class="bandeau-portail-element"><span class="bandeau-portail-icone"><span class="noviewer" typeof="mw:File"></span></span> <span class="bandeau-portail-texte">Portail des logiciels libres</span> </span></li> <li><span class="bandeau-portail-element"><span class="bandeau-portail-icone"><span class="noviewer" typeof="mw:File"></span></span> <span class="bandeau-portail-texte">Portail de l’informatique</span> </span></li> </ul></div><!--htdig_noindex--><div><div class="zim-footer">
Cet article est issu de <a class="external text" title="Dernière modification le 2024-12-04" href="https://fr.wikipedia.org/wiki/?title=LuaTeX&oldid=220866077">Wikipédia</a>. Sauf mention contraire, le texte est disponible sous <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.fr">Creative Commons Attribution-Share Alike 4.0</a>. Des conditions supplémentaires peuvent s’appliquer aux fichiers multimédias.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
<script src="./_webp_/webpHandler.js"></script>
</body></html>